import { View, Image, Text, ITouchEvent } from "@tarojs/components";
import "./index.scss";
import StarsScore from "../../../components/StarsScore";
import { historyInfo } from "../../../configProvider/backendInterface";
import dayjs from "../../../components/TUIKit/utils/dayjs";

export interface HistoryCardProps {
  history: historyInfo,
  onClick?: ((argus?: any) => void),
}
const HistoryCard: React.FC<HistoryCardProps> = ({ history, onClick }) => {
  return (<View className="history-card" onClick={onClick}>
    {/* {JSON.stringify(history)} */}
    <Image className="history-card-portrait" src={'https://avatars.githubusercontent.com/u/43716716?s=200&v=4'} />
    <View className="history-card-name">咨询师 {history.counselor}</View>
    <View className="history-card-score">
      <StarsScore score={history.evaluate} starSize={48}></StarsScore>
    </View>
    <View className="history-card-score-title">
      {dayjs(history.createTime).format('YYYY年MM月DD日 HH:mm:ss')}
    </View>
  </View>)
}
export default HistoryCard;
